package com.kelaite.procurement.dto;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import com.kelaite.procurement.constants.CurrencyTypeEnum;

public class PurchaseOrderDTO {

	private Long id;

	private CompanyDTO tCompany; // companyType是client

	private Long companyId;// companyType是client

	private VendorDTO tVendor;

	private Long vendorId;

	private String purchaseOrderNo; // 甲方的采购订单号

	private String purchaseOrderDesc;

	private String internalPurchaseOrderNo;// 内部采购订单号

	private Date startTime;

	private Date expiredTime;

	private UserDTO tUser;

	private Long userId;

	private short currency;

	private String currencyStr;

	private Float price;

	private Short orderStatus;

	private String deliverAddress;

	private String salesOrderNo; // 乙方的销售订单号（可空）

	private String evaluationDesc1;

	private Double evaluationScore1;

	private String evaluationDesc2;

	private Double evaluationScore2;

	private String evaluationDesc3;

	private Double evaluationScore3;

	private String evaluationDesc4;

	private Double evaluationScore4;

	private String evaluationDesc5;

	private Double evaluationScore5;

	private String evaluationTotalDesc;

	private Double evaluationTotalScore;

	private String evaluatedBy;

	private Date evaluationTime;

	private Date gmtCreateTime;

	private Date gmtUpdateTime;

	private String createdBy;

	private String updatedBy;

	private boolean isDelete;

	private Set<PurchaseOrderItemsDTO> tPurchaseOrderItems = new HashSet<PurchaseOrderItemsDTO>();

	private Set<PurchaseOrderExecutionDTO> tPurchaseOrderExecutions = new HashSet<PurchaseOrderExecutionDTO>();

	private Set<PurchaseOrderPaymentDTO> tPurchaseOrderPayment = new HashSet<PurchaseOrderPaymentDTO>();

	// //////////////////////////////////////
	private Long provinceId;

	private Long cityId;

	private String address;

	private Long pipelinePublicId;
	
	private Long supplierId;

	
	public Long getSupplierId() {
	
		return supplierId;
	}

	
	public void setSupplierId(Long supplierId) {
	
		this.supplierId = supplierId;
	}

	public Long getCompanyId() {

		return companyId;
	}

	public void setCompanyId(Long companyId) {

		this.companyId = companyId;
	}

	public PurchaseOrderDTO() {

		super();
	}

	public PurchaseOrderDTO(String purchaseOrderNo) {

		super();
		this.purchaseOrderNo = purchaseOrderNo;
	}

	public Long getId() {

		return id;
	}

	public void setId(Long id) {

		this.id = id;
	}

	public CompanyDTO gettCompany() {

		return tCompany;
	}

	public void settCompany(CompanyDTO tCompany) {

		this.tCompany = tCompany;
	}

	public VendorDTO gettVendor() {

		return tVendor;
	}

	public void settVendor(VendorDTO tVendor) {

		this.tVendor = tVendor;
	}

	public void settUser(UserDTO tUser) {

		this.tUser = tUser;
	}

	public String getPurchaseOrderNo() {

		return purchaseOrderNo;
	}

	public void setPurchaseOrderNo(String purchaseOrderNo) {

		this.purchaseOrderNo = purchaseOrderNo;
	}

	public String getPurchaseOrderDesc() {

		return purchaseOrderDesc;
	}

	public void setPurchaseOrderDesc(String purchaseOrderDesc) {

		this.purchaseOrderDesc = purchaseOrderDesc;
	}

	public String getInternalPurchaseOrderNo() {

		return internalPurchaseOrderNo;
	}

	public void setInternalPurchaseOrderNo(String internalPurchaseOrderNo) {

		this.internalPurchaseOrderNo = internalPurchaseOrderNo;
	}

	public Date getStartTime() {

		return startTime;
	}

	public void setStartTime(Date startTime) {

		this.startTime = startTime;
	}

	public Date getExpiredTime() {

		return expiredTime;
	}

	public void setExpiredTime(Date expiredTime) {

		this.expiredTime = expiredTime;
	}

	public short getCurrency() {

		return currency;
	}

	public void setCurrency(short currency) {

		this.currency = currency;
	}

	public Float getPrice() {

		return price;
	}

	public void setPrice(Float price) {

		this.price = price;
	}

	public Short getOrderStatus() {

		return orderStatus;
	}

	public void setOrderStatus(Short orderStatus) {

		this.orderStatus = orderStatus;
	}

	public String getDeliverAddress() {

		return deliverAddress;
	}

	public void setDeliverAddress(String deliverAddress) {

		this.deliverAddress = deliverAddress;
	}

	public String getSalesOrderNo() {

		return salesOrderNo;
	}

	public void setSalesOrderNo(String salesOrderNo) {

		this.salesOrderNo = salesOrderNo;
	}

	public String getEvaluationDesc1() {

		return evaluationDesc1;
	}

	public void setEvaluationDesc1(String evaluationDesc1) {

		this.evaluationDesc1 = evaluationDesc1;
	}

	public Double getEvaluationScore1() {

		return evaluationScore1;
	}

	public void setEvaluationScore1(Double evaluationScore1) {

		this.evaluationScore1 = evaluationScore1;
	}

	public String getEvaluationDesc2() {

		return evaluationDesc2;
	}

	public void setEvaluationDesc2(String evaluationDesc2) {

		this.evaluationDesc2 = evaluationDesc2;
	}

	public Double getEvaluationScore2() {

		return evaluationScore2;
	}

	public void setEvaluationScore2(Double evaluationScore2) {

		this.evaluationScore2 = evaluationScore2;
	}

	public String getEvaluationDesc3() {

		return evaluationDesc3;
	}

	public void setEvaluationDesc3(String evaluationDesc3) {

		this.evaluationDesc3 = evaluationDesc3;
	}

	public Double getEvaluationScore3() {

		return evaluationScore3;
	}

	public void setEvaluationScore3(Double evaluationScore3) {

		this.evaluationScore3 = evaluationScore3;
	}

	public String getEvaluationDesc4() {

		return evaluationDesc4;
	}

	public void setEvaluationDesc4(String evaluationDesc4) {

		this.evaluationDesc4 = evaluationDesc4;
	}

	public Double getEvaluationScore4() {

		return evaluationScore4;
	}

	public void setEvaluationScore4(Double evaluationScore4) {

		this.evaluationScore4 = evaluationScore4;
	}

	public String getEvaluationDesc5() {

		return evaluationDesc5;
	}

	public void setEvaluationDesc5(String evaluationDesc5) {

		this.evaluationDesc5 = evaluationDesc5;
	}

	public Double getEvaluationScore5() {

		return evaluationScore5;
	}

	public void setEvaluationScore5(Double evaluationScore5) {

		this.evaluationScore5 = evaluationScore5;
	}

	public String getEvaluationTotalDesc() {

		return evaluationTotalDesc;
	}

	public void setEvaluationTotalDesc(String evaluationTotalDesc) {

		this.evaluationTotalDesc = evaluationTotalDesc;
	}

	public Double getEvaluationTotalScore() {

		return evaluationTotalScore;
	}

	public void setEvaluationTotalScore(Double evaluationTotalScore) {

		this.evaluationTotalScore = evaluationTotalScore;
	}

	public String getEvaluatedBy() {

		return evaluatedBy;
	}

	public void setEvaluatedBy(String evaluatedBy) {

		this.evaluatedBy = evaluatedBy;
	}

	public Date getEvaluationTime() {

		return evaluationTime;
	}

	public void setEvaluationTime(Date evaluationTime) {

		this.evaluationTime = evaluationTime;
	}

	public Date getGmtCreateTime() {

		return gmtCreateTime;
	}

	public void setGmtCreateTime(Date gmtCreateTime) {

		this.gmtCreateTime = gmtCreateTime;
	}

	public Date getGmtUpdateTime() {

		return gmtUpdateTime;
	}

	public void setGmtUpdateTime(Date gmtUpdateTime) {

		this.gmtUpdateTime = gmtUpdateTime;
	}

	public String getCreatedBy() {

		return createdBy;
	}

	public void setCreatedBy(String createdBy) {

		this.createdBy = createdBy;
	}

	public String getUpdatedBy() {

		return updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {

		this.updatedBy = updatedBy;
	}

	public boolean isDelete() {

		return isDelete;
	}

	public void setDelete(boolean isDelete) {

		this.isDelete = isDelete;
	}

	public Set<PurchaseOrderItemsDTO> gettPurchaseOrderItems() {

		return tPurchaseOrderItems;
	}

	public void settPurchaseOrderItems(
			Set<PurchaseOrderItemsDTO> tPurchaseOrderItems) {

		this.tPurchaseOrderItems = tPurchaseOrderItems;
	}

	public Set<PurchaseOrderExecutionDTO> gettPurchaseOrderExecutions() {

		return tPurchaseOrderExecutions;
	}

	public void settPurchaseOrderExecutions(
			Set<PurchaseOrderExecutionDTO> tPurchaseOrderExecutions) {

		this.tPurchaseOrderExecutions = tPurchaseOrderExecutions;
	}

	public Set<PurchaseOrderPaymentDTO> gettPurchaseOrderPayment() {

		return tPurchaseOrderPayment;
	}

	public void settPurchaseOrderPayment(
			Set<PurchaseOrderPaymentDTO> tPurchaseOrderPayment) {

		this.tPurchaseOrderPayment = tPurchaseOrderPayment;
	}

	public UserDTO gettUser() {

		return tUser;
	}

	public String getCurrencyStr() {

		CurrencyTypeEnum currencyType = CurrencyTypeEnum.getCurrency(this
				.getCurrency());
		if (null != currencyType) {
			currencyStr = currencyType.getDesc();
		}
		return currencyStr;
	}

	public void setCurrencyStr(String currencyStr) {

		this.currencyStr = currencyStr;
	}

	public Long getProvinceId() {

		return provinceId;
	}

	public void setProvinceId(Long provinceId) {

		this.provinceId = provinceId;
	}

	public Long getCityId() {

		return cityId;
	}

	public void setCityId(Long cityId) {

		this.cityId = cityId;
	}

	public String getAddress() {

		return address;
	}

	public void setAddress(String address) {

		this.address = address;
	}

	public Long getUserId() {

		return userId;
	}

	public void setUserId(Long userId) {

		this.userId = userId;
	}

	public Long getVendorId() {

		return vendorId;
	}

	public void setVendorId(Long vendorId) {

		this.vendorId = vendorId;
	}

	public Long getPipelinePublicId() {

		return pipelinePublicId;
	}

	public void setPipelinePublicId(Long pipelinePublicId) {

		this.pipelinePublicId = pipelinePublicId;
	}


	@Override
	public String toString() {

		return "PurchaseOrderDTO [id=" + id + ", tCompany=" + tCompany
				+ ", companyId=" + companyId + ", tVendor=" + tVendor
				+ ", vendorId=" + vendorId + ", purchaseOrderNo="
				+ purchaseOrderNo + ", purchaseOrderDesc=" + purchaseOrderDesc
				+ ", internalPurchaseOrderNo=" + internalPurchaseOrderNo
				+ ", startTime=" + startTime + ", expiredTime=" + expiredTime
				+ ", tUser=" + tUser + ", userId=" + userId + ", currency="
				+ currency + ", currencyStr=" + currencyStr + ", price="
				+ price + ", orderStatus=" + orderStatus + ", deliverAddress="
				+ deliverAddress + ", salesOrderNo=" + salesOrderNo
				+ ", evaluationDesc1=" + evaluationDesc1
				+ ", evaluationScore1=" + evaluationScore1
				+ ", evaluationDesc2=" + evaluationDesc2
				+ ", evaluationScore2=" + evaluationScore2
				+ ", evaluationDesc3=" + evaluationDesc3
				+ ", evaluationScore3=" + evaluationScore3
				+ ", evaluationDesc4=" + evaluationDesc4
				+ ", evaluationScore4=" + evaluationScore4
				+ ", evaluationDesc5=" + evaluationDesc5
				+ ", evaluationScore5=" + evaluationScore5
				+ ", evaluationTotalDesc=" + evaluationTotalDesc
				+ ", evaluationTotalScore=" + evaluationTotalScore
				+ ", evaluatedBy=" + evaluatedBy + ", evaluationTime="
				+ evaluationTime + ", gmtCreateTime=" + gmtCreateTime
				+ ", gmtUpdateTime=" + gmtUpdateTime + ", createdBy="
				+ createdBy + ", updatedBy=" + updatedBy + ", isDelete="
				+ isDelete + ", tPurchaseOrderItems=" + tPurchaseOrderItems
				+ ", tPurchaseOrderExecutions=" + tPurchaseOrderExecutions
				+ ", tPurchaseOrderPayment=" + tPurchaseOrderPayment
				+ ", provinceId=" + provinceId + ", cityId=" + cityId
				+ ", address=" + address + ", pipelinePublicId="
				+ pipelinePublicId + ", supplierId=" + supplierId + "]";
	}

}
